package net.badcurrent.ldapodm.test.integration;

import net.badcurrent.ldapodm.annotations.*;

import java.util.Date;

@LdapEntry
@StructuralObjectClass("person")
@ObjectClass({"top", "organizationalPerson", "inetOrgPerson"})
public class User {

    private String username;
    private Integer uidNumber;
    private Integer gidNumber;
    @LdapAttribute({"givenName"})
    private String firstName;
    @LdapAttribute({"sn"})
    private String lastName;
    private String homeDirectory;
    @EmbeddedLdapAttribute
    private Phone phone;
    @LdapAttribute("bogusAttribute")
    private Date creationDate;

    @LdapAttribute("cn")
    public String getFullName() {
        return firstName + " " + lastName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getUidNumber() {
        return uidNumber;
    }

    public void setUidNumber(Integer uidNumber) {
        this.uidNumber = uidNumber;
    }

    public Integer getGidNumber() {
        return gidNumber;
    }

    public void setGidNumber(Integer gidNumber) {
        this.gidNumber = gidNumber;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getHomeDirectory() {
        return homeDirectory;
    }

    public void setHomeDirectory(String homeDirectory) {
        this.homeDirectory = homeDirectory;
    }

    public Phone getPhone() {
        return phone;
    }

    public void setPhone(Phone phone) {
        this.phone = phone;
    }

    @LdapAttribute("creationDate")
    public Date getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }


}
